<template>
  <view class="my-serach-container" :style="{'background-color': bgcolor}">
    <view class="my-serach-box" :style="{'border-radius': bdradius + 'px'}" @click="searchBoxHandler">
      <uni-icons type="search" size="17"></uni-icons>
      <text class="placeholder">搜索</text>
    </view>
  </view>
</template>

<script>
  export default {
    name:"my-search",
    data() {
      return {
        
      };
    },
    props: {
      bgcolor: {
        type: String,
        default: '#c00000'
      },
      bdradius: {
        type: Number,
        default: 18
      }
    },
    methods: {
      searchBoxHandler() {
        this.$emit('click')
      }
    }
  }
</script>

<style lang="scss">
.my-serach-container {
  display: flex;
  align-items: center;
  height: 50px;
  padding: 0 10px;
  
  .my-serach-box {
    display: flex;
    height: 36px;
    width: 100%;
    background-color: #FFFFFF;
    justify-content: center;
    align-items: center;
    
    .placeholder {
      font-size: 12px;
      margin-left: 5px;
    }
  }
}
</style>
